package com.castle.fortress.admin.oa.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.castle.fortress.admin.oa.entity.AttendanceSettingEntity;
import com.castle.fortress.admin.oa.dto.AttendanceSettingDto;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.castle.fortress.admin.system.entity.SysUser;
import com.castle.fortress.common.utils.ConvertUtil;

import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import java.util.List;

/**
 * 考勤规则设置 服务类
 *
 * @author whc
 * @since 2022-11-03
 */
public interface AttendanceSettingService extends IService<AttendanceSettingEntity> {

    /**
     * 分页展示考勤规则设置列表
     *
     * @param page
     * @param attendanceSettingDto
     * @return
     */
    IPage<AttendanceSettingDto> pageAttendanceSetting(Page<AttendanceSettingDto> page, AttendanceSettingDto attendanceSettingDto);

    /**
     * 分页展示考勤规则设置扩展列表
     *
     * @param page
     * @param attendanceSettingDto
     * @return
     */
    IPage<AttendanceSettingDto> pageAttendanceSettingExtends(Page<AttendanceSettingDto> page, AttendanceSettingDto attendanceSettingDto);

    /**
     * 考勤规则设置扩展详情
     *
     * @param id 考勤规则设置id
     * @return
     */
    AttendanceSettingDto getByIdExtends(Long id);

    /**
     * 展示考勤规则设置列表
     *
     * @param attendanceSettingDto
     * @return
     */
    List<AttendanceSettingDto> listAttendanceSetting(AttendanceSettingDto attendanceSettingDto);


    /**
     * 获取用户的 上下班/外勤 打卡规则
     * @param currentUser
     * @param type
     * @return
     */
    AttendanceSettingDto currentUserSetting(SysUser currentUser, Integer type);
}



